package cn.iver.common;

import cn.ratel.db.Generator;
import cn.ratel.db.ds.DruidDataSourceProvider;
import cn.ratel.kit.PropKit;

import java.sql.SQLException;

/**
 * author iver
 */
public class GeneratorRunner {
	public static void main(String[] args) throws SQLException {
		PropKit.use("config-dev.txt");
		String url = PropKit.get("db.url");
		String username = PropKit.get("db.username");
		String password = PropKit.get("db.password");
		String driver = PropKit.get("db.driver");
		DruidDataSourceProvider dataSourceProvider = new DruidDataSourceProvider(url, username, password, driver);
		new Generator("E:\\codeGen", "cn.iver").generate(dataSourceProvider);
	}
}